<script type="text/javascript">
$(function () {
	var url = '${contextPath}script/oa/assets.js';
	$.ajax({url:url, dataType:'script', cache:true,
		success: function(){
			
		}
	});
	$('#editForm').find("input:checkbox, input:radio").not('input.ibtn').uniform();
});
</script>

<#import "/freemarker/modeltype.ftl" as mt>
<#import "/freemarker/modeltype_entity.ftl" as mte>
<div>
	<h3 class="title"><i class="fontello-icon-th-list-1"></i> 编辑物品信息</h3>
</div>
<div class="widget" >
	<div class="widget-content">
		<form id="editForm">
			<table style="width:400px;"  class="table table-bordered animate2 fadeInUp">
				<tr height="40">
					<td style="width: 100px;">名称</td>
					<td>
						<input class="form-control" type="text" id="name" name="name" value="${(assets.name)!''}" />
						<input type="hidden" id="code" name="code" value="${(assets.code)!''}" />
					</td>
				</tr>
				<tr height="40">
					<td>价格</td>
					<td><input class="form-control" type="text" id="price" name="price" value="${(assets.price)!''}" /></td>
				</tr>
				<tr>
					<td>规格</td>
					<td><input class="form-control" type="text" id="norms" name="norms" value="${(assets.norms)!''}" /></td>
				</tr>
				<tr height="40">
					<td>型号</td>
					<td><input class="form-control" type="text" id="type" name="type" value="${(assets.type)!''}" /></td>
				</tr>
				<tr height="40">
					<td>数量</td>
					<td><input class="form-control" type="text" id="num" name="num" value="${(assets.num)!''}" /></td>
				</tr>
				<tr height="40">
					<td>购买人</td>
					<td><input class="form-control" type="text" id="buyers" name="buyers" value="${(assets.buyers)!''}" /></td>
				</tr>
				<tr height="40">
					<td>购买时间</td>
					<td><input class="form-control" type="text" id="buyt" name="buyt" value="${(assets.buyt)!''}"  onclick="WdatePicker({dateFmt:'yyyy-MM-dd'});"/></td>
				</tr>
				<tr height="40">
					<td>使用人</td>
					<td><input class="form-control" type="text" id="users" name="users" value="${(assets.users)!''}" disabled="disabled"/></td>
				</tr>
				<tr height="40">
					<td>备注</td>
					<td><textarea class="form-control" type="text" id="remark" name="remark" value="${(assets.remark)!''}" /></td>
				</tr>
				<#if assets??>
				<tr height="40">
					<td>使用记录</td>
					<td><#list assets.itemList as item>
					<#if item.ac = assets.code>
						<font color="red">${(item.un)!''}</font>(${item.time1?string('yyyy-MM-dd')}—${(item.time2?string('yyyy-MM-dd'))!'没有归还'})</br>
					</#if>
					</#list>
					</td>
				</tr>
				</#if>
				<tr height="40">
					<td colspan="2" style="text-align: center;">
						<a href="javascript:;" class="btn btn-info" onclick="javascript: save_assets(); return false;"><i class="icon-save"></i>&nbsp;保&nbsp;&nbsp;存</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<a href="javascript:;" class="btn btn-primary" onclick="javascript: sys_load_handle('assets');return false;"><i class="fontello-icon-block"></i>&nbsp;取&nbsp;&nbsp;消</a>
					</td>
				</tr>
			</table>
		</form>
	</div>
</div>